﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Data;

namespace WebSite
{
    public class proinfo
    {
        // Methods
        public static string brank(string style)
        {
            string str2 = "";
            DataTable table = SQLAccess.GreatDs("select * from DB_Pinpai where visible=1 and languages=" + info.languages("") + "").Tables[0];
            if (table.Rows.Count > 0)
            {
                foreach (DataRow row in table.Rows)
                {
                    if (style == "1")
                    {
                        string str3 = str2;
                        str2 = str3 + "<li><a href='products_category.aspx?pinid=" + row["pinpaiid"].ToString() + "'>" + row["pinpainame"].ToString() + "</a> </li>";
                    }
                    if (style == "2")
                    {
                        string str4 = str2;
                        str2 = str4 + "<option value='" + row["pinpaiid"].ToString() + "'>" + row["pinpainame"].ToString() + "</option>";
                    }
                }
            }
            return str2;
        }

        public static string shuxin(string xinid, string style)
        {
            string str2 = "";
            DataTable table = SQLAccess.GreatDs("select * from DB_Shuxinvalue where shuxinid=" + xinid + "").Tables[0];
            if (table.Rows.Count > 0)
            {
                foreach (DataRow row in table.Rows)
                {
                    if (style == "1")
                    {
                        string str3 = str2;
                        str2 = str3 + "<li><a href='products_category.aspx?xin" + xinid + "id=" + row["shuxinvalueid"].ToString() + "'>" + row["shuxinname"].ToString() + "</a> </li>";
                    }
                    if (style == "2")
                    {
                        string str4 = str2;
                        str2 = str4 + "<option value='" + row["shuxinvalueid"].ToString() + "'>" + row["shuxinname"].ToString() + "</option>";
                    }
                }
            }
            return str2;
        }

    }
}